import {CUSTOM, FORMAT, FORMAT_DATETIME, INDEX} from "@/utils/enums/type-enums";

export const earlyColumn = [
  {
    type: 'index',
    label: '序号',
    align: 'center',
    name: 'number',
  },
  {
    label: '姓名',
    align: 'center',
    name: 'displayName',
  },
  {
    label: '报警类型',
    align: 'center',
    width: 90,
    name: 'alarmTypeName',
  },
  {
    label: '床位',
    align: 'center',
    name: 'bedName',
  },
  {
    type: FORMAT_DATETIME,
    label: '报警时间',
    align: 'center',
    width: 160,
    formatter: 'YYYY-MM-DD HH:mm:ss',
    name: 'startTime'
  },
  {
    type: FORMAT,
    label: '状态',
    align: 'center',
    name: 'status',
    width: 100,
    value: [{label: '未处理', value: 0}, {label: '已处理', value: 1}]
  },
  {
    type: CUSTOM,
    label: '操作',
    align: 'center',
    buttons: [{method: 'handle', text: '处理'}]
  },
];

export const deviceColumns = [
  {
    type: INDEX,
    label: '序号',
    align: 'center',
    name: 'number',
  },
  {
    label: '设备名称',
    align: 'center',
    name: 'deviceName'
  },
  {
    label: '设备编码',
    align: 'center',
    name: 'deviceCode',
  },
  {
    label: '异常类型',
    align: 'center',
    width: 110,
    name: 'alarmTypeName'
  },
  {
    type: FORMAT_DATETIME,
    label: '报警时间',
    align: 'center',
    width: 160,
    formatter: 'YYYY-MM-DD HH:mm:ss',
    name: 'startTime'
  },
  {
    type: FORMAT,
    label: '状态',
    width: 80,
    align: 'center',
    name: 'status',
    value: [{label: '未处理', value: 0}, {label: '已处理', value: 1}]
  },
  {
    label: '操作',
    type: CUSTOM,
    align: 'center',
    buttons: [{method: 'handle', text: '处理'}]
  },
];

